<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="__PUBLIC__/Js/jquery-1.7.2.min.js"></script>
	<link href="__PUBLIC__/Css/manager.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">
    $(document).ready(function(){
        $("#addBtn").click(function(){
            window.location.href="__APP__/Role/add";
        });
		$('table tr').hover(function(){
				$(this).addClass('hover');
			},function(){
				$(this).removeClass('hover');
			});
    })
</script>

<table cellspacing="0" border="0">
    <tr class="title">
        <th>角色ID</th>
        <th>角色名</th>
        <th>父角色</th>
        <th>角色状态</th>
        <th>创建时间</th>
        <th>更新时间</th>
        <th>备注</th>
        <th>操作</th>
    </tr>
    <volist name="list" id="vo">
        <tr>
            <td>{$vo["id"]}</td>
            <td>{$vo["name"]}</td>
            <td>
                <volist name="list" id="parentVO">
                    <if condition="$vo['pid'] eq $parentVO['id']">
                        {$parentVO['name']}
                    </if>
                </volist>
            </td>
            <td>
                <if condition="$vo['status'] eq 1">
                    有效
                    <elseif condition="$vo['status'] eq 0"/>
                    无效
                </if>
            </td>
            <td>{$vo["createtime"]|date="Y-m-d H:i:s",###}</td>
            <td>{$vo["updatetime"]|date="Y-m-d H:i:s",###}</td>
            <td>{$vo["remark"]}</td>
            <td>
                <a href="__APP__/Role/delete/id/{$vo['id']}">删除</a><br>
                <a href="__APP__/Role/modify/id/{$vo['id']}">修改</a><br>
                <a href="__APP__/RoleUser/index/role_id/{$vo['id']}"> 分配用户</a><br>
                <a href="__APP__/Access/index/role_id/{$vo['id']}"> 分配权限</a>
            </td>
        </tr>
    </volist>

</table>
<input type="button" id="addBtn" value="新增角色">
<br>
<div align="right">{$page}</div>
</body>
</html>